﻿
Imports xmlctrl
Imports xhtmlctrl
Imports webctrl

Public Class wmusclnt
    Inherits cacheControlProcessor

    Public Const _pathidentity As String = "/wmusclnt"

    Public Overrides Function pathidentity() As String
        Return _pathidentity
    End Function

    Protected Overrides Function normalRetiredTicks() As Long
        Return npos
    End Function

    Protected Overrides Function processImpl(ByVal context As httpContext, ByRef control As xmlcontrol) As Boolean
        assert(Not context Is Nothing, "context is nothing.")

        Dim page As xhtmlpage = Nothing
        page = context.createControl(New xhtmlpage())
        page.title().text = context.string(stringId.WMUSCLNT_TITLE)

        Dim div As div = Nothing
        div = context.createControl(New div())
        page.body().addchild(div)

        Dim li As li = Nothing
        li = context.createControl(New li())
        li.text = context.string(stringId.WMUSCLNT_GOODTOPIC)
        div.addchild(li)

        Dim img As img = Nothing
        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("goodtopic.png")
        div.addchild(img)

        div = context.createControl(New div())
        page.body().addchild(div)

        li = context.createControl(New li())
        li.text = context.string(stringId.WMUSCLNT_TOOLONG)
        div.addchild(li)

        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("tooolong.png")
        div.addchild(img)

        div = context.createControl(New div())
        page.body().addchild(div)

        li = context.createControl(New li())
        li.text = context.string(stringId.WMUSCLNT_RUN)
        div.addchild(li)

        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("copylink.png")
        div.addchild(img)

        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("startwmusclnt.png")
        div.addchild(img)

        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("shortit.png")
        div.addchild(img)

        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("done.png")
        div.addchild(img)

        Dim cite As cite = Nothing
        cite = context.createControl(New cite())
        cite.text = context.string(stringId.WMUSCLNT_CLIPBOARD)
        cite.style = "display:block;"
        div.addchild(cite)

        div = context.createControl(New div())
        page.body().addchild(div)

        li = context.createControl(New li())
        li.text = context.string(stringId.WMUSCLNT_BETTER)
        div.addchild(li)

        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("better.png")
        div.addchild(img)

        Dim a As a = Nothing
        a = context.createControl(New a())
        a.href = wmusclntDownloadLink()
        a.text = context.string(stringId.WMUSCLNT_DOWNLOADLINK)
        page.body().addchild(a)

        control = page
        Return True
    End Function
End Class
